Aligning objects with text

ABSTRACT

An object is coupled to a glyph in a text segment, while maintaining the text segment as editable. The text segment includes glyphs, which are graphical representations of characters. Each glyph is defined internally in the form of path information, which includes one or more points corresponding to the outline of the glyph. The path information for the text segment is determined and utilized in order to facilitate the coupling of an object with the text segment. The text segment remains editable as text subsequent to such coupling.

RELATED APPLICATIONS

This patent application is a continuation of U.S. patent applicationSer. No. 15/448,826, filed Mar. 3, 2017, which is herein incorporated byreference in its entirety.

BACKGROUND

Computer graphics applications enable users to design a variety ofgraphics, such as logos, icons, marketing materials, and charts, formany different types of media. Such graphics often include text, as wellas other objects and content. Sometimes, a user needs to precisely alignan object with a segment of text in order to create a particular design.After such alignment, a user may wish to edit the text. However,currently available technology does not allow users to precisely alignan object with text, while maintaining the text as editable.

SUMMARY

Embodiments hereof relate to, among other things, facilitating thealignment of an object with a text segment (or “snapping” an object to atext segment), while maintaining the text segment as editable. The textsegment includes glyphs, which are graphical representations ofcharacters. Typically, each glyph is defined internally in the form ofpath information, which includes one or more points corresponding to theoutline of the glyph. In order to facilitate snapping an object to atext segment, the path information for a glyph included in the textsegment is determined. The object is then be snapped to the glyph basedon the path information. If the text segment is modified, the objectremains snapped to the glyph subsequent to such modification.Accordingly, the object is precisely aligned with a text segment, whilethe text segment remains editable as text.

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used as an aid in determining the scope of the claimed subjectmatter.

BRIEF DESCRIPTION OF THE DRAWINGS

Aspects of the disclosure are described in detail below with referenceto the attached drawing figures, wherein:

FIG. 1 is a block diagram illustrating an exemplary system for aligningan object with text, in accordance with some implementations of thepresent disclosure;

FIGS. 2A-B are exemplary graphical designs that include both text andobjects, in accordance with some implementations of the presentdisclosure;

FIGS. 3A-B illustrate an exemplary conversion of text to an outline, inaccordance with some implementations of the present disclosure;

FIG. 4 illustrates a text segment that includes multiple glyphs, inaccordance with some implementations of the present disclosure;

FIGS. 5A-D illustrate a series of exemplary screenshots in which anobject is snapped to text, in accordance with some implementations ofthe present disclosure;

FIGS. 6A-D illustrate a series of exemplary screenshots in which anobject is snapped to text, in accordance with some implementations ofthe present disclosure;

FIG. 7 is a flow diagram showing an overall method for aligning anobject with text, in accordance with some implementations of the presentdisclosure;

FIG. 8 is a flow diagram showing a method for determining target textfor which snapping functionality is to be enabled, in accordance withsome implementations of the present disclosure;

FIG. 9 is a flow diagram showing a method for determining pathinformation for target text, in accordance with some implementations ofthe present disclosure;

FIG. 10 is a flow diagram showing a method for enabling snappingfunctionality with respect to target text, in accordance with someimplementations of the present disclosure;

FIG. 11 is a flow diagram showing a method for snapping an object totarget text, in accordance with some implementations of the presentdisclosure; and

FIG. 12 is a block diagram of an exemplary computing environmentsuitable for use in implementations of the present disclosure.

DETAILED DESCRIPTION

The subject matter of the present disclosure is described withspecificity herein to meet statutory requirements. However, thedescription itself is not intended to limit the scope of this patent.Rather, the inventors have contemplated that the claimed subject mattermight also be embodied in other ways, to include different steps orcombinations of steps similar to the ones described in this document, inconjunction with other present or future technologies. Moreover,although the terms “step” and/or “block” may be used herein to connotedifferent elements of methods employed, the terms should not beinterpreted as implying any particular order among or between varioussteps herein disclosed unless and except when the order of individualsteps is explicitly described.

Computer graphics applications, such as Adobe Illustrator®, enable usersto design a variety of graphics, such as logos, icons, marketingmaterials, and charts, for many different types of media. Such graphicsoften include text, as well as other objects and content. Sometimes,users need to precisely align an object with a segment of text. Forexample, as shown in FIG. 2A, an arrow has been aligned with a portionof the letter “U,” and elongated lines have been aligned with portionsof the letters “N” and “H.” When an object is precisely aligned in thismanner, it is described as being “snapped” to the text.

The presently available options for precisely aligning an object withtext are unsatisfactory. One option is to manually position the objectnear the text. For example, a user might attempt to draw the object inthe desired location. However, this approach is prone to errors. Forexample, if a user attempts to manually draw and align the elongatedlines shown in FIG. 2A, the user is unlikely to precisely align theelongated line with the relevant portions of the text. Instead, theobject is likely to be slightly offset from the text, as shown in FIG.2B. This offset is visible upon zooming in on the graphic or when thegraphic is rendered in a large format (e.g., in a large poster).

A second option that is presently available involves converting the textto an outline. For example, FIG. 3A depicts normal text art 300. In FIG.3B, the text art 300 of FIG. 3A has been converted into an outline,resulting in path art 302. Upon converting the text to an outline, thepath information for the text is exposed. The path information includesa series of anchor points (e.g., anchor point 304), to which new contentmay be snapped. This facilitates precisely aligning an object with text.However, when the text is converted to an outline, as in FIG. 3B, thetext becomes vector art and can no longer be edited as text. Forexample, suppose a user converted the text “TURN HERE” of FIG. 2A to anoutline in order to facilitate aligning the arrow and extended lineswith the relevant portions of the text. But then suppose the userdesired to change the capital letters “ERE” in “HERE” to lowercaseletters. This would not be possible, because the letters have beenconverted to vector art and are no longer editable as text. Thus, inorder to produce the lowercase letters, the user would be required totype the desired text of “TURN Here,” and then repeat the steps ofconverting the text to an outline and aligning the arrow and extendedlines with the relevant portions of text.

Embodiments hereof address the technical challenge of facilitating theprecise alignment of an object with text, while maintaining the text aseditable. Specifically, the path information for a segment of text isexposed, thus allowing an object to be snapped to a particular anchorpoint and ensuring that the object is precisely aligned with the text(e.g., avoiding the error shown in FIG. 2B), but without converting thetext to an outline. This is accomplished by gathering path informationfor a segment of text and providing the path information to a snappingmodule, which facilitates snapping content to the path. Because thisfunctionality is provided without converting the text to an outline, thetext remains editable as text even after an object is aligned with aportion of the text. For example, the characters in the text may beedited, the font of the text may be changed, or any other text-basedmodification may be made. This advantageously permits users to easilyand quickly design graphics that include both text and other objects andcontent. Fewer user steps are required to create interesting designsinvolving text and other objects. Embodiments hereof provide new ways tocreate designs that include text and other objects, which are notpossible via existing technology.

Turning now to FIG. 1, a block diagram illustrating an exemplary system100 for facilitating the alignment of an object with text is provided,in accordance with implementations of the present disclosure. The system100 is an example of a suitable architecture for implementing certainaspects of the present disclosure. Among other components not shown, thesystem 100 includes a user device 102 interacting with an alignmentengine 108, a font engine 118, and a data store 104 to align an objectwith text, while maintaining the text as editable. Each of thecomponents shown in FIG. 1 can be provided on one or more computerdevices, such as the computing device 1200 of FIG. 12, discussed below.As shown in FIG. 1, the user device 102, the alignment engine 108, thefont engine 118, and the data store 104 can communicate via the network106, which may include, without limitation, one or more local areanetworks (LANs) and/or wide area networks (WANs). The network 106 mayfurther include a cloud computing network, such as a public cloud, aprivate cloud, and/or a dedicated cloud. Such networking environmentsare commonplace in offices, enterprise-wide computer networks, intranetsand the Internet.

In some embodiments, one or more of the illustrated components and/ormodules may be implemented as stand-alone applications. In furtherembodiments, one or more of the illustrated components and/or modulesmay be implemented via a computing device, as an Internet-based service,and/or as a module within the alignment engine 108. It will beunderstood by those of ordinary skill in the art that the components andmodules illustrated in FIG. 1 are exemplary in nature and in number andshould not be construed as limiting. Any number of components and/ormodules may be employed to achieve the functionality described herein.For example, any number of user devices, alignment engines, fontengines, and data stores may be employed within the system 100 withinthe scope of the present invention. Each may comprise a single device ormultiple devices cooperating in a distributed environment. In someinstances, the alignment engine 108, font engine 118, and/or data store104 may reside locally on the user device 102. Other components notshown may also be included within the network environment.

It should be understood that this and other arrangements describedherein are set forth only as examples. Other arrangements and elements(e.g., machines, interfaces, functions, orders, and/or groupings offunctions) can be used in addition to, or instead of, those shown, andsome elements may be omitted all together. Further, many of the elementsdescribed herein are functional entities that may be implemented asdiscrete or distributed components or in conjunction with othercomponents, and in any suitable combination and location. Variousfunctions described herein as being performed by one or more entitiesmay be carried out by hardware, firmware, and/or software. For instance,various functions, including the functions described below with respectto the computing system 100, may be carried out by a processor executinginstructions stored in memory.

The alignment engine 108 includes several modules that facilitatealigning an object with text. Each of these modules is discussed indetail below, but a high-level overview is provided here, with referenceto FIG. 7, which illustrates an exemplary flow diagram 700 that includessteps for aligning an object with text. At step 702, the targetdetermining module 110 determines the target text for which snappingfunctionality is to be enabled. The target text may include an entiresegment of text, a single character within a text segment, or any otherportion of text. At step 704, the path extraction module 112 determinesthe path information for the target text. As previously explained, thepath information includes a series of points (e.g., control points oranchor points) corresponding to the outline of the target text. At step706, the path information for the target text is provided to thesnapping module 114. The snapping module may correspond to an existingmodule in a vector application (e.g., Adobe Illustrator®) or to a newmodule, which receives path information and facilitates snapping contentto that path. Accordingly, when the path information for the target textis provided to the snapping module 114, the snapping module 114facilitates snapping content to the target text. The path informationfor the target text may be stored in data store 104. At step 708, thecontent generation module 116 generates the content that is to besnapped to the target text. For example, the content generation module116 provides drawing tools that are employed by a user to createdifferent vector operations. Such tools include a cursor, pencil tool,pen tool, paintbrush tool, rectangle tool, and others.

A more detailed discussion of the individual modules depicted in FIG. 1will now be provided, beginning with the target determining module 110.The functionality provided by the target determining module 110 isdiscussed with reference to FIG. 8, which includes an exemplary flowdiagram 800. The target text for which the snapping functionality is tobe enabled is determined by the target determining module 110 at step802 based on a variety of factors. In one example, the targetdetermining module 110 receives an indication of a user input thatcorresponds to utilizing a drawing tool to hover over an art object. Inresponse to such input, the target determining module 110 firstdetermines whether the art object is text. If it is, the targetdetermining module 110 determines that the art object over which theuser is hovering is the target text for which the snapping functionalityis to be enabled. If the art object is not text, the target determiningmodule 110 determines that no snapping functionality is to be enabled atthe present time. In another example, a user may select a menu commandindicating that snapping functionality is to be enabled for certaintarget text.

As mentioned, the target text may include an entire segment of text, asingle character within a text segment, or any other portion of text,such as a glyph or combination of glyphs. By way of background, a“glyph” is a graphical element that represents one or more characterswithin a segment of text. FIG. 4 illustrates a text box 400 including atext segment that is comprised of multiple glyphs, such as glyphs 402,404, 406, 408, and 410. In some instances, several characters may berepresented by a single glyph, as is demonstrated by glyph 406. A glyphis associated with a particular font. For example, the character “A” isdisplayed using one glyph for Times New Roman font and another glyph forCalibri font. Accordingly, a font may be considered to be a collectionof glyphs. The target determining module 110 may determine that thetarget text consists of an entire segment of text (e.g., all of the textincluded in text box 400), a single glyph associated with the textsegment (which may include one or more characters), multiple glyphsassociated with the text segment, or any other portion of text. Based ondetermining that the snapping functionality is to be enabled withrespect to target text, the target determining module 110 provides anindication of the target text to the path extraction module 112 at step804.

The functionality provided by the path extraction module 112 isdiscussed with reference to FIG. 9, which includes an exemplary flowdiagram 900. At step 902, the path extraction module 112 receives anindication of the target text for which snapping functionality is to beenabled. The path extraction module 112 utilizes font definitions, whichmay be available via font engine 118, for the target text in order todetermine the relevant path information. Fonts generally fall into oneof several categories, including outline fonts (sometimes called vectorfonts) and bitmap fonts. The font definitions for outline fonts includevector outline information (which is comprised of anchor points) foreach glyph in the font. By contrast, bitmap font definitions consist ofa set of pixels representing an image of a glyph and do not includevector outline information. Thus, the path extraction module 112utilizes font definitions for outline fonts to determine pathinformation.

Each glyph in an outline font is defined internally in the form of avector outline that includes anchor points. For example, the vectoroutlines for TrueType fonts are stored in the form quadratic Beziercurves; the vector outlines for CFF fonts are stored in the form ofcubic Bezier curves; and the vector outlines for some other fonts arestored in the form of Scalable Vector Graphics (“SVG”), which use XML todescribe two-dimensional graphics. OpenType fonts can contain aTrueType, CFF, or SVG representation of an outline. Most well-knownfonts, such as Courier New and Myriad Pro, are OpenType fonts.

The font engine 118 may be an existing module within an operating systemor a particular graphics application, or it may be a new module.Generally, the font engine 118 is responsible for processing font files.When an application requests a particular glyph in an outline font, thefont engine 118 accesses vector outline information for that particularglyph and utilizes that information to render a glyph image that issuitable for display at a user interface. Thus, the vector outlineinformation for various glyphs is available via the font engine 118, butis not usually made visible to users.

At step 904, the path extraction module 112 references the fontdefinition in order to collect the anchor points associated with eachglyph included in the relevant segment of text. Referencing the fontdefinition may include retrieving information from the font engine 118.

The anchor points that are retrieved may be defined in terms of acoordinate system that is specific to an individual glyph, or that has aframe of reference corresponding to the glyph. In this instance, theglyph-centric anchor point data are converted to a set of coordinatesthat reflects the location of individual anchor points with respect tothe overall environment in which the relevant glyph appears (e.g., aposition within a document in a graphics application), or that has aframe of reference corresponding to the overall environment. Forexample, the glyph-centric anchor-point data may be defined with respectto the glyph and utilize a coordinate system having (0, 0) at the centerof the glyph, and the transformed data may be defined with respect to agraphics application document on which the glyph appears and utilize acoordinate system having (0, 0) at the center of the graphicsapplication document. The transformed data may account for both thelocation or position of the glyph with respect to its overallenvironment, as well as the orientation of the glyph (e.g., angle ofrotation, whether it has been converted to a mirror image, and otherpossible configurations). In an example, the conversion betweencoordinate systems is accomplished by applying a transformation matrixto the path information included in the font definition. Accordingly, atstep 906, the path extraction module 112 transforms the anchor pointdata that was collected from the font definition, and at step 908, thetransformed anchor point data is provided to the snapping module 114.The term “anchor points” is used herein to refer to the points thatdefine the path for an art object, but this terminology is not intendedto be limiting. It is understood that other types of points or othertypes of data may be used to define a path and may be used to providethe snapping functionality described herein.

The functionality provided by the snapping module 114 is discussed withreference to FIG. 10, which includes an exemplary flow diagram 1000.Certain vector applications, such as Adobe Illustrator®, may include apreexisting snapping module that facilitates snapping content to knownpaths. Thus, in some instances, the snapping module 114 corresponds to apreexisting snapping module that is enhanced to provide thefunctionality described herein. In other instances, the snapping module114 corresponds to a new module. In either instance, the snapping module114 facilitates the snapping of content to a path. Accordingly, at step1002, the snapping module 114 receives anchor points for the targettext. These anchor points may correspond to the transformed anchor pointdata provided by the path extraction module 112. At step 1004, thesnapping module 114 enables snapping functionality with respect to theanchor points for the target text. As used herein “snapping” refers toprecisely aligning an object with a particular path. For example,“snapping” occurs when an anchor point on an object (e.g., an “objectpoint”) is coupled to an anchor point associated with the target text.Upon such snapping, the object may be locked to the target text, suchthat as the object or the target text is manipulated, the anchor pointon the object remains coupled to the anchor point associated with thetarget text.

The functionality provided by the content generation module 116 isdiscussed with reference to FIG. 11, which includes an exemplary flowdiagram 1100. At step 1102, a user input indicating a command to snap anobject to the target text is received at the content generation module116. For example, the user input may indicate that the object is to becoupled to a particular anchor point associated with the target text.The object may be a new object that is generated based on user input,such as input received via a drawing tool (e.g., cursor, pencil tool,pen tool, paintbrush tool, rectangle tool), or an existing object. Inresponse to the user input, at step 1104, the object is snapped to thetarget text. Subsequently, at step 1106, a user input indicating acommand to modify the target text is received. In response, at step1108, the target text is modified. Potential modifications to the targettext include replacing an existing character included in the target textwith a new character, changing a font style associated with the targettext, or any number of other modifications. The object remains coupledto the target text during and after the modification of the target text.This modification is possible because the target text was not convertedto an outline in order to provide the snapping functionality. Instead,the target text retains the true semantics of text art and remainseditable as text.

The snapping functionality discussed above may be implemented accordingto at least two exemplary methods, each of which is discussed below.According to the first exemplary method, anchor point information isdetermined for all glyphs included in a particular segment of text, anitem of text art, or a document in a graphics application. According tothe second exemplary method, anchor point information is determined “ondemand” for a particular glyph that is indicated by user.

First Exemplary Method

The following exemplary algorithms correspond to the first method, inwhich anchor point information for all glyphs in a text segment isdetermined. As used in these algorithms, the term “hit art” refers tothe art object over which a drawing tool is hovering. The firstalgorithm is a top-level algorithm, which adds anchor points to thesnapping module 114. The top-level algorithm calls to theGetGlyphsAnchorPoint algorithm, which receives text art as an input andreturns as an output a list of the anchor points for all glyphs in thetext art.

Top-level algorithm:

1. Start Algorithm

2. Hit Art=Get the current hit art

3. If the Hit Art is a text art, do the following:

-   -   a. snapPointList=GetGlyphsAnchorPoint(Hit Art)

4. Add snapPointList in the Snapping Module

5. End of the Algorithm.

GetGlyphsAnchorPoint:

1. Start Algorithm

2. snapPointList=empty

3. for each line (L) in the text art

-   -   a. for each glyph(G) in the line (L)        -   i. anchorPoints=Get Anchor Point of Glyph (G) from the font        -   ii. Apply transformation to the anchorPoints        -   //Transformation is applied so as to get the anchor point            position        -   //depending on the current glyph position    -   iii. snapPointList.add(anchorPoints)

4. snapPointList contains all the required anchorPoints

5. End of the Algorithm.

The alignment engine 108 may implement the above algorithms. In anexample, the target determining module 110 performs the second step ofthe top-level algorithm and determines the target text for whichsnapping functionality is to be enabled, while the path extractionmodule 112 performs the third step of the top-level algorithm, as wellas the corresponding steps in the GetGlyphsAnchorPoint algorithm. Forexample, as discussed above, the path extraction module 112 extractsanchor point data from the relevant font definition. The path extractionmodule 112 then applies a transformation to the glyph-centriccoordinates in order to obtain coordinates that reflect the location ofindividual anchor points with respect to the overall environment inwhich the relevant glyph appears. This transformed anchor point data isloaded into a snap point list that is referenced by the snapping module114 in the fourth step of the top-level algorithm.

The anchor points may be stored at data store 104 in a cache that isspecific to every item of text art. This is advantageous, because thealignment engine 108 need not determine anchor points anew each timethey are needed. In one example, when the text art is modified, thecache is invalidated such that anchor points are determined anew thenext time that they are needed. This is helpful, because after the texthas been modified, the anchor point information is obsolete. Forexample, if a lowercase “e” is changed to an uppercase “E,” or if an “a”is changed to a “b,” the corresponding anchor points will be different.Invalidation may be triggered based on any modification to an item oftext art (e.g., if any glyph in an item of text art is modified, thecache associated with the entire item of text art is invalidated) and/orbased on a modification of a particular glyph (e.g., if a glyph in anitem of text art is modified, the cache associated with that particularglyph is invalidated, but the cache associated with the remaining glyphsin the text art remains valid). Other invalidation logic may also beimplemented.

FIGS. 5A-D include an exemplary series of screenshots in which an objectis snapped to text according to the first exemplary method. In FIG. 5A,a user utilizes a drawing tool (e.g., a cursor) to hover over an item oftext art. Based on this hovering, or on another user input, the item oftext art consisting of the word “Text” is identified as the target textfor which snapping functionality is to be enabled. Accordingly, the pathinformation for the glyphs associated with the word “Text” isdetermined. This may include collecting anchor point data from the fontdefinition associated with the glyphs and transforming that data, asdiscussed above. A list of anchor points is then provided to thesnapping module 114. In FIG. 5B, visual representations of the anchorpoints are provided for display (e.g., at a user interface of a graphicsapplication) and made visible to the user. In some instances, visualrepresentations of the anchor points are not provided for display. Forexample, an anchor point may be visible only when a user utilizes adrawing tool to hover over a portion of a glyph that is associated withthe anchor point. Such hovering may cause a visual representation of theassociated anchor point to be provided for display.

In FIG. 5C, user-generated content 506 is snapped to the glyph thatrepresents the letter “T” via the anchor points 502 and 504. Forexample, anchor points on the user-generated content 506 are coupled toanchor points 502 and 504. Because this snapping functionality isenabled without converting the text to an outline, the text remainseditable as text. Accordingly, in FIG. 6D, the text has been edited toinclude capital letters “E,” “X,” and “T.” The user-generated content506 remains snapped to anchor points 502 and 504.

Second Exemplary Method

As mentioned, according to the second exemplary method, anchor pointinformation is determined “on demand” for a particular glyph that isindicated by user. This is advantageous if text art includes many glyphsand it is unnecessary to collect anchor point information for all of theglyphs in order to facilitate the snapping functionality desired by auser. Collecting the anchor point information for only a single glyph ora subset of glyphs within text art utilizes less compute and memoryresources and yield better performance, as compared to collecting theanchor point information for all glyphs within text art. For example,collecting anchor point information for text art may include retrievingthe information from the font engine 118, which requires time andprocessing power. Thus, if an item of text art includes 100 glyphs, thenfetching path information for all 100 glyphs is resource intensive, butfetching path information for a subset of those glyphs is moremanageable.

The intent of a user to snap an object to a particular glyph or glyphsmay be ascertained in a number of ways. For example, if a user utilizesa drawing tool to hover over a particular glyph for a threshold amountof time (e.g., 1 second, 2 seconds, 3 seconds, 4 seconds, 5 seconds),then it is inferred that the user desires to snap an object to thatparticular glyph. Accordingly, anchor point information is collected forthat particular glyph by the path extraction module 112 and provided tothe snapping module 114. The threshold amount of time may be auser-defined parameter or may be a default parameter. In anotherexample, a user may select a menu command indicating that snappingfunctionality is to be enabled for a certain glyph or glyphs.

The following exemplary algorithms correspond to the second method. Thefirst algorithm is a top-level algorithm, which adds anchor points forthe appropriate glyph to the snapping module 114, based on an inferreduser intent. The top-level algorithm calls to the NeedSnapping andGetGlyphAnchorPoint algorithms.

The NeedSnapping algorithm determines whether snapping functionality isneeded with respect to a particular glyph (e.g., infers whether the userintends to enable snapping functionality with respect to that glyph)based on an amount of time that a drawing tool has hovered over the sameglyph. The parameter Tolerance(T) is the time (e.g., in seconds) forwhich a tool must hover over a particular glyph in order for snappingfunctionality to be enabled with respect to that glyph. As mentioned,this parameter may be user-defined and/or provided by default. TheNeedSnapping algorithm returns a true or false value depending onwhether snapping is needed.

The GetGlyphAnchorPoint receives as input an indication of the targettext art and the glyph number associated with the glyph for whichsnapping functionality is needed. Each glyph within an item of text artor within an overall document in a graphics application may beassociated with a glyph number. For example, each of the glyphs in FIG.4 may be associated with different glyph numbers. TheGetGlyphAnchorPoint algorithm returns a list of anchor points for theindicated glyph (“Nth glyph”) in the target text.

Top-level algorithm:

Global parameters:

-   -   last_hit_art=text art object which is last hit    -   start_time=time when the hovering (hit) started at the last hit        art    -   last_hit_glyph=glyph no. over which tool is hovering in previous        call

1. Start Algorithm

2. If NeedSnapping( )

-   -   a. snapPointList=GetGlyphAnchorPoint(last_hit_art,        last_hit_glyph)

3. Add snapPointList in the Snapping Module

4. End of the Algorithm.

NeedSnapping:

1. Start Algorithm

2. needSnapping=false;

3. current_art=Get the current hit text art,

4. current_time=Get current time

5. If current_art=last_hit_art

-   -   a. current_glyph=Get current hit glyph number    -   b. If current_glyph=last_hit_glyph        -   i. If current time—start_time>=Tolerance(T)            -   1. needSnapping=true    -   c. else//Reset global parameter        -   i. last_hit_glyph=current_glyph        -   ii. start_time=current time

6. Else//Reset global parameter

-   -   a. last_hit_art=current_art    -   b. start_time=current time    -   c. last_hit_glyph=0

7. return needSnapping.

8. End of the Algorithm

GetGlyphAnchorPoint:

1. Start Algorithm

2. G=Nth Glyph in the text art

3. anchorPoints=Get Anchor Point of Glyph (G) from the font

4. Apply transformation into the anchorPoints

//Transformation is applied so as to get the anchor point position

//depending on the current glyph position

5. return anchorPoints

6. End of the Algorithm.

The alignment engine 108 may implement the above algorithms. In anexample, the target determining module 110 implements the NeedSnappingalgorithm and provides information relevant to the last_hit_art andlast_hit_glyph parameters, while the path extraction module 112implements the GetGlyphAnchorPoint algorithm. For example, as discussedabove, the path extraction module 112 extracts anchor point data fromthe relevant font definition. The path extraction module 112 thenapplies a transformation to the glyph-centric coordinates in order toobtain coordinates that reflect the location of individual anchor pointswith respect to the overall environment in which the relevant glyphappears. This transformed anchor point data is loaded into a snap pointlist that is referenced by the snapping module 114 in the third step ofthe top-level algorithm.

The anchor points may be stored at data store 104 in a cache that isspecific to every item of text art. In an example, the anchor points arestored with reference to glyph number and an identification of the textart. This is advantageous, because the alignment engine 108 need notdetermine anchor points anew each time they are needed. In one example,when a glyph is modified, the cache is invalidated such that anchorpoints are determined anew the next time that they are needed. Asexplained above, this is helpful, because as after the glyph has beenmodified, the anchor point information is obsolete. Invalidation may betriggered based on any modification to an item of text art (e.g., if anyglyph in an item of text art is modified, the cache associated with theentire item of text art is invalidated) and/or based on a modificationof a particular glyph (e.g., if a glyph in an item of text art ismodified, the cache associated with that particular glyph isinvalidated, but the cache associated with the remaining glyphs in thetext art remains valid). Other invalidation logic may also beimplemented.

FIGS. 6A-D include an exemplary series of screenshots in which an objectis snapped to text according to the second exemplary method. In FIG. 6A,a user utilizes a drawing tool (e.g., a cursor) to hover over an item oftext art. In particular, the cursor hovers over the glyph thatrepresents the letter “e.” If the hovering time exceeds a predefinedthreshold, it is inferred that the user intends to snap an object tothat particular glyph. Accordingly, the path information for that glyphis determined. This path information may be determined automatically, orwithout user intervention, in response to the hover time exceeding thepredefined threshold. Determining the path information may includecollecting anchor point data from the font definition associated withthe glyph and transforming that data, as discussed above. A list ofanchor points is provided to the snapping module 114. In FIG. 6B, ananchor point 602 on the selected glyph is made visible to the user. Inone example, visual representations of all anchor points associated witha selected glyph are provided for display (e.g., at a user interface ofa graphics application), and in another example, visual representationsof a subset of the anchor points are provided for display. In FIG. 6B,for example, only the anchor point 602 associated with the location ofthe user's cursor is displayed. The anchor point 602 is magnified tofacilitate the user employing the anchor point 602 to snap content tothe associated text. In FIG. 6C, user-generated content 606 is snappedto the anchor point 602 on the glyph that represents the letter “e.”Also in FIG. 6C, the user's cursor is hovering over the glyph thatrepresents the letter “T.” Based on this user input, the pathinformation for that glyph has been determined and provided to thesnapping module 114. Accordingly, the anchor point 604 associated withthe location of the user's cursor is displayed and made available forsnapping. Anchor point 604 is magnified to facilitate the user employingthe anchor point 604 to snap content to the associated text. In FIG. 6C,the user-generated content 606 is snapped to the anchor point 604 on theglyph that represents the letter “T.” For example, an anchor point onthe user-generated content 606 is coupled to the anchor point 604.Because this snapping functionality is enabled without converting thetext to an outline, the text remains editable as text. Accordingly, inFIG. 6D, the text has been edited to read, “TextEdit.” Theuser-generated content 606 remains snapped to the anchor points 602 and604 associated with the letters “T” and “e,” respectively, during andsubsequent to the text editing operation.

In the preceding examples discussed with respect to FIGS. 5A-D and 6A-D,the object snapped to the text was new content created by a user. Itwill be understood, however, that the object could be content previouslycreated by a user (e.g., an existing object in a graphics applicationworkspace), predefined content provided by a graphics application, orany other type of content. Accordingly, the object that is snapped totext may be drawn in association with the relevant anchor points, suchthat it is snapped to the text as soon as it is created, or it may bedrawn separately from the relevant anchor points and later re-positionedin order to be snapped to the text.

In some instances, the glyph to which an object has been snapped isedited. In one example, this causes the object to dissociate from theglyph. Thus, if the “T” in FIG. 5D is changed to a “t,” then theuser-generated content 506 remains visible in the graphics application,but it is no longer snapped to the glyph “t” (e.g., the user-generatedcontent 506 is floating in space in the relevant graphics application).In another example, in response to editing the glyph to which an objecthas been snapped, the object remains snapped to the revised glyph. Inorder to enable this functionality, anchor points associated with commonvariations of a glyph are mapped to one another. For example, the anchorpoints for the crossbar on the uppercase “T” may be mapped to the anchorpoints for the crossbar on the lowercase “t,” such that when the “T” ischanged to a “t,” the user-generated content 506 remains snapped to thecrossbar. Common variations of a glyph include uppercase and lowercaseletters, as in the preceding example, as well as different font styles.

Exemplary Operating Environment

Having described implementations of the present disclosure, an exemplaryoperating environment in which embodiments of the present invention maybe implemented is described below in order to provide a general contextfor various aspects of the present disclosure. Referring to FIG. 12, anexemplary operating environment for implementing embodiments of thepresent invention is shown and designated generally as computing device1200. Computing device 1200 is but one example of a suitable computingenvironment and is not intended to suggest any limitation as to thescope of use or functionality of the invention. Neither should thecomputing device 1200 be interpreted as having any dependency orrequirement relating to any one or combination of componentsillustrated.

Embodiments hereof may be described in the general context of computercode or machine-useable instructions, including computer-executableinstructions such as program modules, being executed by a computer orother machine, such as a smartphone, personal data assistant, or otherhandheld device. Generally, program modules, or engines, includingroutines, programs, objects, components, data structures, etc., refer tocode that perform particular tasks or implement particular abstract datatypes. Embodiments hereof may be practiced in a variety of systemconfigurations, including hand-held devices, consumer electronics,general-purpose computers, more specialty computing devices, etc.Embodiments hereof may also be practiced in distributed computingenvironments where tasks are performed by remote-processing devices thatare linked through a communications network.

With reference to FIG. 12, computing device 1200 includes a bus 1210that directly or indirectly couples the following devices: memory 1212,one or more processors 1214, one or more presentation components 1216,input/output ports 1218, input/output components 1220, and anillustrative power supply 1222. Bus 1210 represents what may be one ormore busses (such as an address bus, data bus, or combination thereof).Although the various blocks of FIG. 12 are shown with clearly delineatedlines for the sake of clarity, in reality, delineating variouscomponents is not so clear, and metaphorically, the lines would moreaccurately be grey and fuzzy. For example, one may consider apresentation component such as a display device to be an I/O component,as well. Also, processors have memory. The inventors recognize that suchis the nature of the art, and reiterate that the diagram of FIG. 12 ismerely illustrative of an exemplary computing device that can be used inconnection with one or more embodiments of the present disclosure.Distinction is not made between such categories as “workstation,”“server,” “laptop,” “hand-held device,” etc., as all are contemplatedwithin the scope of FIG. 12 and reference to “computing device.”

Computing device 1200 typically includes a variety of computer-readablemedia. Computer-readable media can be any available media that can beaccessed by computing device 1200 and includes both volatile andnonvolatile media, removable and non-removable media. By way of example,and not limitation, computer-readable media may comprise computerstorage media and communication media.

Computer storage media include both volatile and nonvolatile, removableand non-removable media implemented in any method or technology forstorage of information such as computer-readable instructions, datastructures, program modules or other data. Computer storage mediaincludes, but is not limited to, RAM, ROM, EEPROM, flash memory or othermemory technology, CD-ROM, digital versatile disks (DVD) or otheroptical disk storage, magnetic cassettes, magnetic tape, magnetic diskstorage or other magnetic storage devices, or any other medium which canbe used to store the desired information and which can be accessed bycomputing device 1200. Computer storage media does not comprise signalsper se.

Communication media typically embodies computer-readable instructions,data structures, program modules or other data in a modulated datasignal such as a carrier wave or other transport mechanism and includesany information delivery media. The term “modulated data signal” means asignal that has one or more of its characteristics set or changed insuch a manner as to encode information in the signal. By way of example,and not limitation, communication media includes wired media such as awired network or direct-wired connection, and wireless media such asacoustic, RF, infrared and other wireless media. Combinations of any ofthe above should also be included within the scope of computer-readablemedia.

Memory 1212 includes computer storage media in the form of volatileand/or nonvolatile memory. As depicted, memory 1212 includesinstructions 1224. Instructions 1224, when executed by processor(s) 1214are configured to cause the computing device to perform any of theoperations described herein, in reference to the above discussedfigures, or to implement any program modules described herein. Thememory may be removable, non-removable, or a combination thereof.Exemplary hardware devices include solid-state memory, hard drives,optical-disc drives, etc. Computing device 1200 includes one or moreprocessors that read data from various entities such as memory 1212 orI/O components 1220. Presentation component(s) 1216 present dataindications to a user or other device. Exemplary presentation componentsinclude a display device, speaker, printing component, vibratingcomponent, etc.

I/O ports 1218 allow computing device 1200 to be logically coupled toother devices including I/O components 1220, some of which may be builtin. Illustrative components include a microphone, joystick, game pad,satellite dish, scanner, printer, wireless device, etc. The I/Ocomponents 1220 may provide a natural user interface (NUI) thatprocesses air gestures, voice, or other physiological inputs generatedby a user. In some instance, inputs may be transmitted to an appropriatenetwork element for further processing. A NUI may implement anycombination of speech recognition, touch and stylus recognition, facialrecognition, biometric recognition, gesture recognition both on screenand adjacent to the screen, air gestures, head and eye-tracking, andtouch recognition associated with displays on the computing device 1200.The computing device 1200 may be equipped with depth cameras, such as,stereoscopic camera systems, infrared camera systems, RGB camerasystems, and combinations of these for gesture detection andrecognition. Additionally, the computing device 1200 may be equippedwith accelerometers or gyroscopes that enable detection of motion.

Embodiments presented herein have been described in relation toparticular embodiments which are intended in all respects to beillustrative rather than restrictive. Alternative embodiments willbecome apparent to those of ordinary skill in the art to which thepresent disclosure pertains without departing from its scope.

From the foregoing, it will be seen that this disclosure in one welladapted to attain all the ends and objects hereinabove set forthtogether with other advantages which are obvious and inherent to thesystems and methods.

It will be understood that certain features and subcombinations are ofutility and may be employed without reference to other features orsubcombinations. This is contemplated by and is within the scope of theclaims.

In the preceding Detailed Description, reference is made to theaccompanying drawings which form a part hereof wherein like numeralsdesignate like parts throughout, and in which is shown, by way ofillustration, embodiments that may be practiced. It is to be understoodthat other embodiments may be utilized and structural or logical changesmay be made without departing from the scope of the present disclosure.Therefore, the preceding detailed description is not to be taken in alimiting sense, and the scope of embodiments is defined by the appendedclaims and their equivalents.

Various aspects of the illustrative embodiments have been describedusing terms commonly employed by those skilled in the art to convey thesubstance of their work to others skilled in the art. However, it willbe apparent to those skilled in the art that alternate embodiments maybe practiced with only some of the described aspects. For purposes ofexplanation, specific numbers, materials, and configurations are setforth in order to provide a thorough understanding of the illustrativeembodiments. However, it will be apparent to one skilled in the art thatalternate embodiments may be practiced without the specific details. Inother instances, well-known features have been omitted or simplified inorder not to obscure the illustrative embodiments.

Various operations have been described as multiple discrete operations,in turn, in a manner that is most helpful in understanding theillustrative embodiments; however, the order of description should notbe construed as to imply that these operations are necessarily orderdependent. In particular, these operations need not be performed in theorder of presentation. Further, descriptions of operations as separateoperations should not be construed as requiring that the operations benecessarily performed independently and/or by separate entities.Descriptions of entities and/or modules as separate modules shouldlikewise not be construed as requiring that the modules be separateand/or perform separate operations. In various embodiments, illustratedand/or described operations, entities, data, and/or modules may bemerged, broken into further sub-parts, and/or omitted.

The phrase “in one embodiment” or “in an embodiment” is used repeatedly.The phrase generally does not refer to the same embodiment; however, itmay. The terms “comprising,” “having,” and “including” are synonymous,unless the context dictates otherwise. The phrase “A/B” means “A or B.”The phrase “A and/or B” means “(A), (B), or (A and B).” The phrase “atleast one of A, B or C” means “(A), (B), (C), (A and B), (A and C), (Band C), or (A, B and C).”

What is claimed is:
 1. A computer system comprising: one or moreprocessors; and one or more computer storage media storingcomputer-executable instructions that, when executed by the one or moreprocessors, cause the one or more processors to: identify a glyph in atext segment is a target glyph for a snapping operation, the targetglyph comprising a graphical element representing a first characterwithin the text segment, retrieve path information for the target glyphfrom a font definition associated with the target glyph, the pathinformation comprising information for one or more points on an outlineof the target glyph, and in response to a user input indicating a pointof the one or more points, couple an object to the point withoutconverting the text segment to an outline to maintain the text segmentas editable text.
 2. The computer system of claim 1, wherein the glyphin the text segment is identified as the target glyph in response to auser input hovering over the glyph in the text segment for an amount oftime that exceeds a predefined threshold.
 3. The computer system ofclaim 1, the instructions further causing the one or more processors to:cause display of a visual representation of the one or more points onthe target glyph.
 4. The computer system of claim 1, the instructionsfurther causing the one or more processors to: in response to a userinput to modify the text segment, modify the text segment as text. 5.The computer system of claim 4, wherein the object remains coupled tothe target glyph after the text segment is modified.
 6. The computersystem of claim 5, wherein the target glyph is modified and wherein theobject is coupled to a new point on the modified target glyph.
 7. Thecomputer system of claim 1, wherein the object is coupled to the pointby coupling an object point associated with the object to the point. 8.The computer system of claim 1, wherein the path information isdetermined for all glyphs included in the text segment and is stored ina cache.
 9. One or more computer storage media storing computer-useableinstructions that, when executed by a computing device, cause thecomputing device to perform operations, the operations comprising:determining, from a font definition, path information for a glyphincluded in a text segment, the path information comprising informationfor one or more points on the glyph; and in response to a user inputindicating an object and the glyph, snapping the object to the glyphusing a point of the one or more points on the glyph without convertingthe text segment to an outline to maintain the text segment as editabletext.
 10. The computer storage media of claim 9, wherein the operationsfurther comprise: receiving a user input indicating the glyph includedin the text segment; based on the user input, inferring a user intent toenable snapping functionality for the glyph; and based on the inferreduser intent, determining the glyph is a target glyph for a snappingoperation.
 11. The computer storage media of claim 10, wherein the userinput indicating the glyph included in the text segment compriseshovering over the glyph in the text segment for a hover time thatexceeds a predefined threshold.
 12. The computer storage media of claim11, wherein the path information is determined automatically in responseto the hover time exceeding the predefined threshold.
 13. The computerstorage media of claim 9, the operations further comprising: causingdisplay of a visual representation of the one or more points on theglyph.
 14. The computer storage media of claim 9, the operations furthercomprising: in response to a user input to modify the text segment,modifying the text segment as text.
 15. The computer storage media ofclaim 14, wherein the object remains snapped to the target glyph afterthe text segment is modified.
 16. The computer storage media of claim15, wherein the target glyph is modified and wherein the object iscoupled to a new point on the modified target glyph.
 17. The computerstorage media of claim 9, wherein snapping the object to the glyphcomprises coupling an object point associated with the object to thepoint of the one or more points included in the path information for theglyph.
 18. The computer storage media of claim 9, wherein the pathinformation is determined for all glyphs included in the text segmentand is stored in a cache.
 19. A computer-implemented method comprising:identifying a glyph in a text segment as a target glyph; retrieving pathinformation for the target glyph from a font definition associated withthe target glyph; determining coordinate information for one or morepoints on an outline of the target glyph based on the path information;and in response to a user input to snap an object to the target glyph,coupling an object to the target glyph using the coordinate informationfor a point from the one or more points while maintaining the textsegment as editable text.
 20. The computer-implemented method of claim19, wherein the method further comprises: in response to a user input tomodify the text segment, modifying the text segment as text.